home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HPAVC
/
HPAVC CD-ROM.iso
/
LORD2B6.ZIP
/
CASTLE1.REF
< prev
next >
Wrap
Text File
|
1997-05-16
|
7KB
|
333 lines
;note to .ref masters:
;replace castle1 with something else to use this .ref for other dwellings
;this .ref uses no long term vars, instead it makes its own data file - this
;means upgrading the game will not make people 'lose ownership' of their
;stuff.
@#TOWER
;Tower in the castle
@DO SAYBAR
`2The tower on this castle is not ready yet.
@do moveback
@#doorguard
@do moveback
@label startg
;guy who owns on it pushes against the door guard symbol. This lets him
;control the password to gain entrance to the castle, as well as sell it
;back or transfer ownership.
@if castle1.dat exist false then do
@begin
@do saybar
`0"You have 5 minutes to vacate this keep!" `2the guard barks.
@closescript
@end
@readfile castle1.dat
`p20
`s01
@
;load owner and current password
@if `p20 not &playernum then do
@begin
@do saybar
You wave to the door guard, nice of him to let you in.
@closescript
@end
@busy
@do `v01 is 1 ;set default choice to 1
@show
`r0`c `r1 Instucting your servants `r0
`2The huge doorguard snaps to attention when he sees you are going to
address him.
@do write
`x`x
@choice
Set password to gain entrance (currently is `0`s01`%)
Ownership options
Leave
@
@if responce is 2 then do
@begin
@show
`r0`c `r1 Ownershop Options `r0
`2You retrieve your deed and carefully look it over.
@do `v01 is 1
@do write
`x`x
@choice
Transfer deed to someone else
Sell property back to the bank for `$1,500`%.
Do nothing of the sort
@if response is 1 then do
@begin
@show
`\`\ `2Transfer to whom?
@chooseplayer `p20
@if `p20 is 0 then do
@begin
@show
`2You decide to keep your domain - for now.`\`\`k
@do goto startg
@end
@do `s02 is getname `p20
@show
`2 Are you sure you wish to give your keep to `0`s02`2?
@do write
`x`x
@choice
Yes
Not on your life.
@if responce is 2 then do
@begin
@show
`\`\ `2You decide to keep your domain - for now.`\`\`k
@do goto startg
@end
@do delete castle1.dat
@writefile castle1.dat
`p20
`s01
@writefile mail\mail`p20.dat
`0Business note:
`2-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
`0 `n`2 has transferred ownership of Runion Keep to you.
Password to enter will remain `0"`s01"`2 unless
`2you come by and change it.
@do addlog
`0`n`2 has given `%Runion Keep`2 to `0`s02`2!
@routine seperate in gametxt.ref
@show
`\`\ `2Deed transfered. Oh well - it was fun while it lasted.`\`\`k
@do goto done
@end
@if response is 2 then do
@begin
@show
`\`\`2 Are you sure you wish to sell your keep back to the bank?`\
@do `v01 is 1
@do write
`x`x
@choice
Yes
Not on your life.
@if responce is 2 then do
@begin
@show
`\`\ `2You decide to keep your domain - for now.`\`\`k
@do goto startg
@end
@do delete castle1.dat
@do money + 1500
@show
`\`\ `%KEEP SOLD!`2`\`\`k
@do addlog
`0`n`2 has sold `%Runion Keep`2 back to the bank!
@routine seperate in gametxt.ref
@do goto done
@end
@do goto startg
@end
@if responce is 1 then do
@begin
@do write
`\`\ `0"And the new password, s&sir?" `2(enter `4NONE`2 for no access to anyone)`\ `2Password:`x
@do readstring 40 `s01 `s01
@do `p20 is length `s01
@if `p20 < 2 then do
@begin
@show
`\`\ `2You decide the current password is ok.`\`\`k
@do goto startg;
@end
@do delete castle1.dat
@writefile castle1.dat
&playernum
`s01
@show
`\`\ `0"Yes s&sir, I will not forget it!" `2the guard promises.`\`\`k
@do goto startg
@end
@drawmap
@update
@#sign
@do moveback
@if castle1.dat exist false then do
@begin
@do saybar
Runion Keep - For sale cheap, enquire inside.
@end
@if castle1.dat exist true then do
@begin
@readfile castle1.dat
`p20
`s01
@
@do `s01 is getname `p20
@do saybar
`2Property of `0`s01`2.
@end
@#enter
@do moveback
@offmap
@if castle1.dat exist false then do
@begin
@show
`r0`c `r1 `%For Sale `r0
`2Runion Keep was once a magnificient structure that housed many of
the royal families. Now it houses dust and decay.
It is for sale, however. The asking price is `$$3,000`2.
@do `v01 is 1
@do write
`x`x
@choice
>&money 2999 Purchase it.
<&money 3000 Sigh wistfully and leave since you don't have enough.
>&money 2999 Leave.
@
@if responce is 1 then do
@begin
@if castle1.dat exist true then do
@begin
@show
`\`\ `2Oh crap! Someone bought it while you were thinking about it. You
will regret your snail like thinking for the rest of your days.`\`\`k
@do goto done
@end
@writefile castle1.dat
&playernum
NONE
@do money - 3000
@do addlog
`0`n `2buys `%Runion Keep`2!
@routine seperate in gametxt.ref
@show
`r0`c `r1 `%Why hello there, landowner! `r0
`\`2 Nice job! You now own this keep!
`k `0As a special bonus, two beds and a door guard are included!
`2Enjoy your new home.`\`\`k
@end
@label done
@drawmap
@update
@closescript
@end
@readfile castle1.dat
`p20
`s01
@
@do `p21 is deleted `p20
@if `p21 is 1 then do
@begin
;owner got deleted!!! Lets put it up for sale again.
@do delete castle1.dat
@do addlog
`%Runion Keep`2 is put on the market today.
@routine seperate in gametxt.ref
;run script again
@do goto enter
@end
@if `p20 not &playernum then do
@begin
@do `s02 is getname `p20
@do upcase `s01
@if `s01 is NONE then do
@begin
@show
`r0`c `r1 None shall pass `r0
`2You pound on the door for some time before you get an answer.
`0"Master `s02`0 has declared that `4NO`0 visitors shall be allowed!" `2a
voice calls from behind the wall.
`4Ouch!
`k
@do goto done
@end
@show
`r0`c `r1 Stand and unfold thyself `r0
`2 A head pops over the gate. `0"Halt, you! What business have you with
my lord and master, `%`s02`0?" `2the door guard asks.
@do write
`x`x
@do `v01 is 1
@choice
Offer an explanation.
Visit later.
@if response is 1 then do
@begin
@do write
`\`\ `2Say what? :`x
@do readstring 40 NIL `s03
@do upcase `s03
@do upcase `s01
@if `s03 is `s01 then do
@begin
@show
`\`\ `0"Welcome to `%Runion Keep`0,"`2 the guard smiles as he opens the gate.`\`\`k
@do goto letmein
@end
@writefile mail\mail`p20.dat
`0Runion Keep Reports:
`2-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
`0 `n`2 attempted to sweet talk the guard by saying
`0"`s03"`2. `2He was `bNOT`2 allowed in.
@show
`\`\ `2The guard doesn't look too interested.`\`\`k
@do goto done
@end
@do goto done
@end
;let him in
@label letmein
@do x is 39
@do y is 19
@do map is 1361
@loadmap 1361
@do goto done
@#done